Skip to content

Conversation

@ottointhesky
Copy link
Contributor

First version of adding a task label feature that is queryable in the hubDB as discussed in #914.

What's missing?

  • to check if task label is supported by all task submitting functions
  • currently only dictDB supports the new column
  • documentation of the feature (in docu and code)
  • adding unittest

@minrk
Copy link
Member

minrk commented Jan 23, 2026

Nice! For applying the task_label metadata, look at how and where after is handled in the client, and copy that for a new label field (we can use label instead of task_label, since everything is a task already).

@ottointhesky
Copy link
Contributor Author

Thanks for the feedback.

  • As suggested I have renamed the parameter from task_label to label (in all places including the dictDB)
  • Handling label like after works nicely for the map[_async] function (via the flags functionality) but for apply[_async] I still need to check the kwargs for the parameter (see location 1 and location 2 ). How can I improve that?

@minrk
Copy link
Member

minrk commented Jan 26, 2026

**kwargs are taken for apply, since view.apply(f, label=x) already means call f(label=x) remotely. That means label must be passed via the temp_flags context manager:

with view.temp_flags(label="x"):
    view.apply(f, a=b)

If we want to come up with another nicer way to avoid temp_flags (I agree it's a bit tedious), that would be appropriate, but it must not conflict with passing kwargs to f, and should probably be separate from this PR. It could be something like apply(f, args, __label, __after, etc.) where the __ prefix means to pass it to IPP instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants